<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/lottery_view_header}

	<div class="con_box" id="PLAY-CONTAINER">
		<div class="mainNav">
			<div class="mainNav-list">
				<!--ko foreach:navLevel1-->
				<a href="javascript:;" data-bind="text:name,click:$parent.navParentClick,css:$parent.active1()===id?'active':''">五星</a>
				<!--/ko-->
			</div>
			
			<div class="gamePlay">
				<a href="javascript:;" title="信用玩法"></a>
				<span class="page-ico" style="position:absolute;right:0;top:0;">
					<img src="static/images/new-ico.gif" />
				</span>
			</div>
		</div>
		<div class="mainNav-children" data-bind="foreach:navLevel2_3">
			<div>
				<span data-bind="text:name+'：'"></span>
				<!-- ko foreach:children -->
				<a href="javascript:;" data-bind="text:name,click:$root.navChildClick,css:$root.active2()===id?'select':''"></a>
				<!-- /ko -->
			</div>
		</div>
		<div class="sumBtn_box"><div class="clear" data-bind="component:{name:scene}"></div></div>
		<div class="help-box clear">
			<div class="current-game fleft">
				<span><b data-bind="text:navLevel1()[currentPlay().addr[0]].name">&nbsp;</b>：<label data-bind="text:currentPlay().name">&nbsp;</label></span>
			</div>
			<div class="fleft">
				<div class="checkbox-box" data-bind="if:appearOmitUseful">
					<label class="checkbox" data-bind="css:appear()?'select':''" for="APPEAR"><input type="checkbox" class="checkbox-hide" id="APPEAR" data-bind="checked:appear,event:{change:appearOmitEvent.bind($data,1)}" />冷热</label>
					<label class="checkbox" data-bind="css:omit()?'select':''" for="OMIT"><input type="checkbox" class="checkbox-hide" id="OMIT" data-bind="checked:omit,event:{change:appearOmitEvent.bind($data,2)}" />遗漏</label>
				</div>
				<div class="help-tips">					
					<span class="help-exp" data-bind="hover:currentPlay().config.example" data-align="top"></span>
					<span class="help-help" data-bind="hover:currentPlay().config.rule" data-align="top"></span>
				</div>
				<span class="fleft" data-bind="text:currentPlay().config.description">&nbsp;</span>
			</div>			
		</div>
		
		<div class="betNum-btn row_btm clear">
			<div class="betNum-in">
				<div class="amount-box">
					<div class="amount">
						<i class="minus" data-bind="click:upDown.bind($data,-1)">-</i>
						<input type="text" data-bind="textinput:multiple,event:{focus:showMultipleBox.bind($data,true),blur:multipleBlur}" maxlength="6" />
						<i class="plus" data-bind="click:upDown.bind($data,1)">+</i>
						<ul class="dropdown" data-bind="visible:showMultipleBox,foreach:multipleArr">
							<li data-bind="text:$data,click:$parent.selectMultiple"></li>
						</ul>
					</div>
					<span>倍</span>
					<span>模式</span>
					<div class="unit-box select-box" data-bind="slideDown:unit">
						<div class="unit"><span data-slide="bar">元</span><i></i></div>
						<ul data-slide="body" id="MoneyModel">
							<li><a href="javascript:;" data-value="1">元</a></li>
							<!--<li><a href="javascript:;" data-value="0.1">角</a></li>
							<li><a href="javascript:;" data-value="0.01">分</a></li>
							<li><a href="javascript:;" data-value="0.001">厘</a></li>-->
						</ul>
					</div>
				</div>
				<div class="buyBonus" id="slipper" data-ratio="11.5">
					<div data-bind="if:currentMaxRatio()>0">
						<div class="BonusPercen" data-bind="text:ratio()+'%'">&nbsp;</div>
						<a href="javascript:;" class="minus"></a>
						<div class="ranger">
							<div class="ui-widget">
								<span class="ui-handle" style="left: 0;"></span>
							</div>
						</div>
						<a href="javascript:;" class="plus"></a>
						<div class="Bonus">
							<span style="padding-top:8px" data-bind="text:currentOdds().toFixed(4)-0">0</span>
						</div>
					</div>
					<div data-bind="if:currentMaxRatio()===0">
						<div class="BonusPercen" style="width:45px;text-align:right">奖金：</div>
						<div class="Bonus">
							<span style="padding-top:8px" data-bind="text:currentOdds().toFixed(4)-0">0</span>
						</div>
					</div>
				</div>
				<span class="total">共选<label data-bind="text:realtimeCount" class="extraFontC"></label>注，共投<label data-bind="text:realtimeSum" class="extraFontC">1</label>元，盈利<label class="extraFontC" data-bind="text:willWinAmount"></label> 元</span>
			</div>
			<a href="#" class="btn add-btn" data-bind="click:confirm,css:realtimeCount()>0?'activate':''" title="确认选号"></a>
			<a href="#" class="btn confirm-btn" data-bind="click:confirm.bind($data, 'submitNow'),css:realtimeCount()>0?'activate1':''" title="立即下注"></a>
		</div>
		<div class="line1"></div>
		
		<div class="betNum-list clear">
			<div class="bet-box betB-w40">
				<div class="row_btm clear">
					<span class="fleft" data-bind="if:randomUseful">随机<input type="text" data-bind="textinput:randomCount" maxlength="2" />注<a href="#" class="btn Random-btn" data-bind="click:doRandom">随机</a></span>
					<span class="tit">投注列表</span>
					<a href="" class="btn delete-btn" data-bind="click:orderEmpty">清空</a>
				</div>
				<div class="table-list betb-main">
					<table>
						<tbody data-bind="foreach:orderList">
							<tr>
								<td data-bind="text:title">&nbsp;</td>
								<td width="160"><div class="ellipsis" style="width:160px" data-bind="text:content,attr:{title:content.length>500?(content.slice(0,500)+'...'):content}">&nbsp;</div></td>
								<td data-bind="text:$root.UNIT_MAPPING[unit+'']">&nbsp;</td>
								<td><span data-bind="text:count">&nbsp;</span>注</td>
								<td><span data-bind="text:multiple">&nbsp;</span>倍</td>
								<td><span data-bind="text:amount">&nbsp;</span>元</td>
								<td><a href="#" class="btn" data-bind="click:$parent.orderRemove">X</a></td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
			
			<div class="bet-box betB-w25">
				<div class="row_btm">
					<span class="tit">操作状态</span>
				</div>
				<div class="betb-main">
					<div class="clear"><span class="fleft">选择</span><span class="fright"><label data-bind="text:orderList().length" class="extraFontC">&nbsp;</label>单</span><span class="fright"><label data-bind="text:orderCount()" class="extraFontC">&nbsp;</label>注</span></div>
					<div class="clear"><span class="fleft">投注</span><span class="fright"><label data-bind="text:orderAmount()" class="extraFontC">&nbsp;</label>元</span></div>
					<div class="clear"><span class="fleft">追号</span><span class="fright" data-bind="text:appendInfo">&nbsp;</span></div>
				</div>
			</div>
			<div class="bet-box betB-w35">
				<div class="row_btm"></div>
				<div class="betb-main">
					<div class="NumberCheck clear">
						<a href="" class="btn Continue-btn" title="我要追号" data-bind="click:append"></a>
						<div class="fleft">
							<label class="checkbox" for="CK-stopAfterSkip" data-bind="css:stopAfterSkip()?'select':''"><input class="checkbox-hide" id="CK-stopAfterSkip" type="checkbox" data-bind="checked:stopAfterSkip" />官方跳开即停</label>
							<label class="checkbox" for="CK-stopAfterWin" data-bind="css:stopAfterWin()?'select':''"><input class="checkbox-hide" id="CK-stopAfterWin" type="checkbox" data-bind="checked:stopAfterWin" />中奖后停止追号</label>
						</div>
					</div>
					<a href="#" class="btn deter-btn" data-bind="click:submit" title="确认下注"><label data-bind="visible:isAppend,text:'追'+totalAppendPeriod()">&nbsp;</label></a>
				</div>
			</div>
		</div>
		
		<div class="bet-history clear">
			<div class="row_btm">
				<a href="javascript:;" class="btn" style="left:10px;right:auto" data-bind="visible:checkedOrderIDs().length>0,click:doBatchRevoke">批量撤单<b data-bind="visible:checkedOrderIDs().length>0,text:'('+checkedOrderIDs().length+')'"></b></a>
				<span class="tit">游戏记录</span>
				<a href="{U('member/order')}" class="btn">更多记录</a>
			</div>
			<div class="table-list">
				<table>
					<thead>
						<tr>
							<th><input type="checkbox" data-bind="event:{change:checkedOrderAllIDsEvent},checked:checkedOrderIDs().length===revokeLength(),visible:revokeLength()>0" /></th>
							<th>注单编号</th>
							<th>玩法</th>
							<th>期号</th>
							<th>投注时间</th>
							<th>投注内容</th>
							<th>倍模</th>
							<th>总金额</th>
							<th>奖金</th>
							<th>状态</th>
						</tr>
					</thead>
					<tbody data-bind="foreach:orderLogList">
						<tr data-bind="hover:$parent.orderItemDetail,click:$parent.orderFullDetail" data-delay="500" style="cursor:pointer">
							<td noclick="1"><input type="checkbox" data-bind="checked:$root.checkedOrderIDs,value:OrderId,visible:status()===0" /></td>
							<td data-bind="text:Ordernumber">&nbsp;</td>
							<td data-bind="text:GamePlayName">&nbsp;</td>
							<td data-bind="text:NumberOfPeriod">&nbsp;</td>
							<td data-bind="text:CreateTime">&nbsp;</td>
							<td><div data-bind="text:Content" style="width:100px;" class="ellipsis">&nbsp;</div></td>
							<td data-bind="text:Times()+'倍/'+unitName()">&nbsp;</td>
							<td data-bind="text:Amount()-0">&nbsp;</td>
							<td data-bind="text:BettingBalance()-0>0?BettingBalance():0">&nbsp;</td>
							<td><font class="fc_yellow" data-bind="text:['可撤单','已撤单','已派奖','未中奖','已删除','未开奖','未结算','处理中','下注失败'][status()]+(IsTrack()?'[追号]':''), css:['status-undo','status-hasundo','status-win','status-lose','status-delete','status-unlottery','status-lottery','status-undo','status-hasundo'][status()-0]">&nbsp;</font></td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
	</div>

{template index/lottery_view_footer}